
cc.Class({
    extends: require('wy-Component'),

    properties: {
        top:cc.Node,
        bottom:cc.Node,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
    },

    start () {},

    moveIn(cb){
        this.top.y=1066;
        this.bottom.y=-1180;
        this.top.runAction(cc.moveTo(0.5,cc.v2(0,373)));
        this.bottom.runAction(cc.sequence(cc.moveTo(0.5,cc.v2(0,-224.5)),cc.callFunc(cb)));
        
    },

    moveOut(cb){
        var self = this;
        this.top.runAction(cc.moveTo(0.5,cc.v2(0,1066)));
        this.bottom.runAction(cc.sequence(cc.moveTo(0.5,cc.v2(0,-1180)),cc.callFunc(function(){
            self.node.active = false;
            cb && cb();
        })));
    },

    update (dt) {
    },
});
